import React from 'react';
import {
  HomeOutlined, ClusterOutlined, SettingFilled, GoldOutlined
} from '@ant-design/icons';

const { changeView = () => {} } = window;

const menus = {
  mode: "inline", // 菜单类型 垂直 水品 内嵌
  // defaultSelectedKeys: ['0'], // 默认选中菜单的key
  // defaultOpenKeys: ['0'], // 默认展开的菜单
  theme: 'light', // 主题
  items: [
    {
      label: '主页',
      icon: <HomeOutlined />,
      key: '0',
      path: '/main',
      type: 'menuItem',
      onClick: () => { changeView('/main'); }
    },
    {
      label: '监控告警',
      icon: <ClusterOutlined />,
      key: '1',
      children: [
        {
          label: '网关监控',
          key: '1-1',
          path: '/main/gateway',
          onClick: () => { changeView('/main/gateway'); }
        },
        {
          label: '服务告警',
          key: '1-2',
          path: '/main/serverAlarm',
          onClick: () => { changeView('/main/serverAlarm'); }
        },
        {
          label: '服务列表',
          key: '1-3',
          path: '/main/serverList',
          onClick: () => { changeView('/main/serverList'); }
        }
      ]
    },
    {
      label: '系统管理',
      icon: <SettingFilled />,
      key: '2',
      children: [
        {
          label: '配置管理',
          key: '2-1',
          path: '/main/alarmMgr',
          onClick: () => { changeView('/main/alarmMgr'); }
        }
      ]
    },
    {
      label: '三方接入',
      icon: <GoldOutlined />,
      key: '3',
      path: '/main/thirdParty',
      type: 'menuItem',
      onClick: () => { changeView('/main/thirdParty'); }
    }
  ]
};

export default menus;
